Worst Case Time Complexity

When the partition is unbalanced

You can say that So you can make the above

When it is Balanced

Expected Time (average)?

If the Partition is balanced in 50% of the cases:

This is equivalent to:

=

Randomized-quicksort is the same as the average case - 1/2 chance of being balanced with randomly chosen pivot.